<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>13delay的用法</title>
</head>
    <style>
        div {
            width: 400px;
            height: 60px;
            background-color: pink;
            text-align: center;
            line-height: 60px;
            font-size: 30px;
            margin: 100px auto;
            display: none;
        }
    </style>
<body>

    <div>这是一个提示消息</div>
    <script src="../jquery-3.2.1.js"></script>
    <script>
        $(function(){
            // delay 延迟
            $("div").fadeIn(1000).delay(2000).fadeOut(1000); 
        })
    </script>
    
</body>
</html>